473,422 Members | 1,894 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,422 software developers and data experts.

ODBC / Vista / Foxpro

I have installed our .NET application on a system running Microsoft Windows
Vista operating system.

When I run our application, I receive the following error message whenever
it tries to create a DBF file using VFPODBC:
"ERROR [IM001] [Microsoft][ODBC Driver Manager] Driver does not support this
function"

I am using a connection string that I have used for many years with no
problems, here is some sample C# code:

try
{
string connectionStatement = "Driver={Microsoft Visual FoxPro
Driver};SourceType=DBF;SourceDb=C:\\temp";
string createTableStatement = "CREATE TABLE [c:\\temp\\test] FREE(field1
C(10), field2 C(10), field3 C(10))";

OdbcConnection dbConnection = new OdbcConnection(connectionStatement);
dbConnection.Open();

OdbcCommand createCmd = new OdbcCommand(createTableStatement,
dbConnection);
createCmd.ExecuteNonQuery(); <<<< Fails here with the
message above >>>>
}
catch( System.Exception e )
{
MessageBox.Show(e.Message, "Error Creating Report Table"
,MessageBoxButtons.OK, MessageBoxIcon.Error);
}
How can I get my program to work in Vista (32 and 64bit)?
Rob

Oct 11 '06 #1
4 8427

"Robert Hooker" <rh*****@noemail.noemailwrote in message
news:OG**************@TK2MSFTNGP05.phx.gbl...
>I have installed our .NET application on a system running Microsoft Windows
Vista operating system.

When I run our application, I receive the following error message whenever
it tries to create a DBF file using VFPODBC:
"ERROR [IM001] [Microsoft][ODBC Driver Manager] Driver does not support
this function"

I am using a connection string that I have used for many years with no
problems, here is some sample C# code:

try
{
string connectionStatement = "Driver={Microsoft Visual FoxPro
Driver};SourceType=DBF;SourceDb=C:\\temp";
string createTableStatement = "CREATE TABLE [c:\\temp\\test] FREE(field1
C(10), field2 C(10), field3 C(10))";

OdbcConnection dbConnection = new OdbcConnection(connectionStatement);
dbConnection.Open();

OdbcCommand createCmd = new OdbcCommand(createTableStatement,
dbConnection);
createCmd.ExecuteNonQuery(); <<<< Fails here with the
message above >>>>
}
catch( System.Exception e )
{
MessageBox.Show(e.Message, "Error Creating Report Table"
,MessageBoxButtons.OK, MessageBoxIcon.Error);
}
How can I get my program to work in Vista (32 and 64bit)?
Rob
You could try:

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=<path>;Extended
Properties=dBASE IV;User ID=Admin;Password="

as the connection string and use OleDb instead of ODBC.

HTH,
Mythran
Oct 11 '06 #2
Small correction:

It actually fails here:
dbConnection.Open();
"Robert Hooker" <rh*****@noemail.noemailwrote in message
news:OG**************@TK2MSFTNGP05.phx.gbl...
>I have installed our .NET application on a system running Microsoft Windows
Vista operating system.

When I run our application, I receive the following error message whenever
it tries to create a DBF file using VFPODBC:
"ERROR [IM001] [Microsoft][ODBC Driver Manager] Driver does not support
this function"

I am using a connection string that I have used for many years with no
problems, here is some sample C# code:

try
{
string connectionStatement = "Driver={Microsoft Visual FoxPro
Driver};SourceType=DBF;SourceDb=C:\\temp";
string createTableStatement = "CREATE TABLE [c:\\temp\\test] FREE(field1
C(10), field2 C(10), field3 C(10))";

OdbcConnection dbConnection = new OdbcConnection(connectionStatement);
dbConnection.Open();

OdbcCommand createCmd = new OdbcCommand(createTableStatement,
dbConnection);
createCmd.ExecuteNonQuery(); <<<< Fails here with the
message above >>>>
}
catch( System.Exception e )
{
MessageBox.Show(e.Message, "Error Creating Report Table"
,MessageBoxButtons.OK, MessageBoxIcon.Error);
}
How can I get my program to work in Vista (32 and 64bit)?
Rob

Oct 11 '06 #3
Hi Mythran,

For the record, not all DBFs are compatible with the dBase driver. FoxPro
DBFs created with VFP3-6 may be accessed via the FoxPro and Visual FoxPro
ODBC drivers, downloadable from
msdn.microsoft.com/vfoxpro/downloads/updates/odbc, and also DBFs that are
created with VFP7-9 if they don't use any of the new data features added in
VFP7 and above.

All versions of FoxPro DBFs are accessible via the FoxPro and Visual FoxPro
OLE DB data provider, downloadable from
msdn.microsoft.com/vfoxpro/downloads/updates .
--
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
ci***@cindywinegarden.com
"Mythran" <ki********@hotmail.comwrote in message
news:em**************@TK2MSFTNGP03.phx.gbl...
>
"Robert Hooker" <rh*****@noemail.noemailwrote in message
news:OG**************@TK2MSFTNGP05.phx.gbl...
You could try:

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=<path>;Extended
Properties=dBASE IV;User ID=Admin;Password="

as the connection string and use OleDb instead of ODBC.

Oct 11 '06 #4
Hi Robert,

Have you tried the FoxPro and Visual FoxPro OLE DB data provider,
downloadable from msdn.microsoft.com/vfoxpro/downloads/updates ? A typical
OLE DB data provider connection string (in VB) looks like:

connString = "Provider = VFPOLEDB.1; Data Source = C:\Temp;"

You can only work with Visual FoxPro ODBC or OLE DB in a 64-bit environment
in compatibility mode. There are no plans to create a 64-bit FoxPro ODBC
driver or OLD DB data provider. I'm told there will, however, be a .NET data
provider for FoxPro.

--
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
ci***@cindywinegarden.com
"Robert Hooker" <rh*****@noemail.noemailwrote in message
news:ON**************@TK2MSFTNGP04.phx.gbl...
It actually fails here:
dbConnection.Open();
>"ERROR [IM001] [Microsoft][ODBC Driver Manager] Driver does not support
this function"
>try
{
string connectionStatement = "Driver={Microsoft Visual FoxPro
Driver};SourceType=DBF;SourceDb=C:\\temp";
string createTableStatement = "CREATE TABLE [c:\\temp\\test]
FREE(field1 C(10), field2 C(10), field3 C(10))";

OdbcConnection dbConnection = new OdbcConnection(connectionStatement);
dbConnection.Open();
>How can I get my program to work in Vista (32 and 64bit)?

Oct 11 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: MLH | last post by:
I'm running XP. Is it required that a given ODBC driver be selected or set somehow as a default driver? Look at this... Here's the error: Error: ODBC call failed... Datasource not found and no...
1
by: Salad | last post by:
Hi: I am developing an application using FoxPro 2.x tables. My client has AccessXP. AccessXP uses Visual Foxpro ODBC to connect to tables. It does not accept the ISAM Foxpro driver used in A97....
0
by: Salad | last post by:
My operating system is WinXP Pro. I have 1 gig of memory and the chip is an Intel Pentium 4. I am using Access97. A table has been supplied to me from an external source createdc from Visual...
6
by: Jozef | last post by:
Hello, Is there any way to automatically create an ODBC data source if it doesn't already exist? I'd like to deploy this program on workstations that I may not have access to, and don't want...
1
by: GPBSOFT | last post by:
I am Italian developer, escuse me for my bad English I have a problem with ODBC. I must link to a database from Visual FoxPro, I have installed Windows XP Professional with service pack 2. When I...
8
by: smerf | last post by:
I haven't delved into the beast that is Vista from a programming standpoint yet. But, if the blog at http://west-wind.com/WebLog/posts/4983.aspx is any indication of what we're in for.....I say we...
4
by: Robert Hooker | last post by:
I have installed our .NET application on a system running Microsoft Windows Vista operating system. When I run our application, I receive the following error message whenever it tries to create...
7
by: Salad | last post by:
I am converting an application from A97 to A2003. I have 2 tables created by another application as a Foxpro.dbf. The table has no index. The connect string in A97 is FoxPro...
3
by: Salad | last post by:
Is it the rule that any table that you want to use via ODBC must be a UNIQUE record? And if you want any speed associated with the table it should be indexed? I was having some difficulty...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.